Sentiment Analysis with Neural Networks
Importing Twits
Criteria | Meet Specification |
---|---|
Length of Data |
Print the number of twits in the dataset. |
Preprocessing the Data
Criteria | Meet Specification |
---|---|
Pre-Processing |
The function
|
Preprocess All the Twits |
Preprocess all the twits into the
|
Bag of Words |
Create a bag of words using the tokenized data. |
Frequency of Words Appearing in Message |
Remove most common and rare words by defining the following variables:
|
Updaing Vocabulary by Removing Filtered Words |
Defining the variables : 'vacab', 'id2vocab' and 'filtered' correctly. |
Neural Network
Criteria | Meet Specification |
---|---|
TextClassifier. init |
The init function correctly initializes the following parameters:
|
TextClassifier.init_hidden |
The 'init_hidden' function generates a hidden state |
TextClassifier.forward |
The 'forward' function performs a forward pass of the model the parameter input using the hidden state. |
Training
Criteria | Meet Specification |
---|---|
Training and Validation |
Correctly split the data into
|
Training |
Train your model with dropout and clip the gradient. Print out the training progress with the loss and accuracy. |
Making Predictions
Criteria | Meet Specification |
---|---|
Prediction |
The
|
What is the prediction of the model? What is the uncertainty of the prediction? |
Answer what the prediction of the model is and the uncertainty of the prediction. |